<template>
  <div style="margin-bottom:50px">
        <!-- <top :pageTitle="pageTitle"></top> -->
        <div style="padding:15px 0 0 0;background:#ffffff">
            <list v-for="(data,i) in dataList" :key='i' :data='data' v-if="i < 2"></list>
            <div style="text-align:center;height:50px;line-height:50px;border-top:1px solid #fafafa" v-show="isShow" v-on:click="more($event)"><span>点击展示更多</span><img src="../assets/ic@2x.png"></div>
        </div> 
        <after-sale-submit></after-sale-submit> 
  </div>
</template>
<script>
import List from '@/components/customerService/list.vue';
import AfterSaleSubmit from '@/components/common/afterSaleSubmit.vue';
import Top from '@/components/common/top.vue';
import axios from 'axios';

export default {
    name:'onlyRefunds',
    components:{
        'List':List,
        'AfterSaleSubmit':AfterSaleSubmit,
        'Top':Top
    },
    data () {
        return {
            dataList:[
            {id:1,imgUrl:'https://img.alicdn.com/bao/uploaded/i3/3085960453/TB2bmQFsVGWBuNjy0FbXXb4sXXa_!!3085960453-0-item_pic.jpg',size:'xl',color:'红色',num:1,price:300,title:'冬季羽绒服貂毛'},
            {id:2,imgUrl:'https://img.alicdn.com/bao/uploaded/i3/3085960453/TB2bmQFsVGWBuNjy0FbXXb4sXXa_!!3085960453-0-item_pic.jpg',size:'xxl',color:'白色',num:1,price:299,title:'冬季羽绒服貂毛'},
            {id:3,imgUrl:'https://img.alicdn.com/bao/uploaded/i3/3085960453/TB2bmQFsVGWBuNjy0FbXXb4sXXa_!!3085960453-0-item_pic.jpg',size:'l',color:'黑色',num:1,price:358,title:'冬季羽绒服貂毛'},
            {id:4,imgUrl:'https://img.alicdn.com/bao/uploaded/i3/3085960453/TB2bmQFsVGWBuNjy0FbXXb4sXXa_!!3085960453-0-item_pic.jpg',size:'s',color:'绿色',num:1,price:198,title:'冬季羽绒服貂毛'}
            ],    
            pageTitle:'仅退款',
            isShow:true,  
        }
    },
    computed:{
    },
    methods:{
        more:function(e){
           this.isShow=false
        }
    },
    created() {
        this.$http.post('/api/api/user/applyRefund', 
        {
            time:'1532658064',
            device_id:'1532658064',
            version:'1.0.1',
            platform:'android',
            token:'69f7e6e2e95aaef9c58efb1fefdbba4b',
            page:1,
        })
        .then(function (response) {
            console.log('success:',response);
        })
        .catch(function (response) {
            console.log(response);
        })
        if(this.$route.query.id==0){
            this.pageTitle="仅退款"
        }else if(this.$route.query.id==1){
            this.pageTitle="换货"
        }else if(this.$route.query.id==2){
            this.pageTitle="退货退款"
        }

    },
    mounted(){
        
        
    }
}
</script>
<style lang='scss'>

</style>